﻿#ifndef OPENGL_LINES2_H
#define OPENGL_LINES2_H

#include <QOpenGLWindow>
#include <QOpenGLFunctions>
#include <QOpenGLShaderProgram>
#include <QtMath>
#include <QtDebug>
#include <QElapsedTimer>

class OpenGL_Lines2 : public QOpenGLWindow, protected QOpenGLFunctions
{
public:
    OpenGL_Lines2(QOpenGLWindow *parent = nullptr);
    ~OpenGL_Lines2();

protected:
    void initializeGL();
    void resizeGL(int w, int h);
    void paintGL();

private:
    void initializeOriginArraies(int num);

private:
    QElapsedTimer *time;
    QOpenGLShaderProgram *shaderProgram;
    qreal *originPosX;
    qreal *originPosY;
    int pointsAmount;

    int color;
    QVector4D lineColor;

    int xposAttri;
    int yposAttri;

    int count;
};

#endif // OPENGL_LINES2_H
